<template>
  <div class="look-main" >
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
     <form-create :option="option" :rule="rule"></form-create>
    </el-dialog>
  </div>
</template>

<script>
import create from "./create"
export default {
  data() {
    return {
      dialogVisible: false
    }
  },
  props: {
    option: {
      type: Object,
      default: function () {
        return {}
      }
    },
    rule: {
      type: Array,
      default: function () {
        return []
      }
    }
  },
  methods: {
    handleClose(done) {
      // :visible.sync this.$emit('update:visible', false);
      this.$confirm("是否删除").then(() => {
        console.log(1)
        console.log(done)
        done()
      })["catch"](() => {
        console.log(2)
      })
    }
  },
  components: {
    create
  }
}
</script>
<style lang="less">
.look-main {
  .el-dialog__wrapper {
    min-width: 1854px;
  }
}
</style>
